\(\int \sqrt {b \tan ^2(e+f x)} \, dx\) [3]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 14, antiderivative size = 32 \[ \int \sqrt {b \tan ^2(e+f x)} \, dx=-\frac {\cot (e+f x) \log (\cos (e+f x)) \sqrt {b \tan ^2(e+f x)}}{f} \]

[Out]

-cot(f*x+e)*ln(cos(f*x+e))*(b*tan(f*x+e)^2)^(1/2)/f

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3739, 3556} \[ \int \sqrt {b \tan ^2(e+f x)} \, dx=-\frac {\cot (e+f x) \sqrt {b \tan ^2(e+f x)} \log (\cos (e+f x))}{f} \]

[In]

Int[Sqrt[b*Tan[e + f*x]^2],x]

[Out]

-((Cot[e + f*x]*Log[Cos[e + f*x]]*Sqrt[b*Tan[e + f*x]^2])/f)

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3739

Int[(u_.)*((b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Tan[e + f*x]^n)^FracPart[p]/(Tan[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Tan[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps \begin{align*} \text {integral}& = \left (\cot (e+f x) \sqrt {b \tan ^2(e+f x)}\right ) \int \tan (e+f x) \, dx \\ & = -\frac {\cot (e+f x) \log (\cos (e+f x)) \sqrt {b \tan ^2(e+f x)}}{f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.00 \[ \int \sqrt {b \tan ^2(e+f x)} \, dx=-\frac {\cot (e+f x) \log (\cos (e+f x)) \sqrt {b \tan ^2(e+f x)}}{f} \]

[In]

Integrate[Sqrt[b*Tan[e + f*x]^2],x]

[Out]

-((Cot[e + f*x]*Log[Cos[e + f*x]]*Sqrt[b*Tan[e + f*x]^2])/f)

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.16

method result size
derivativedivides \(\frac {\sqrt {b \tan \left (f x +e \right )^{2}}\, \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \tan \left (f x +e \right )}\) \(37\)
default \(\frac {\sqrt {b \tan \left (f x +e \right )^{2}}\, \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \tan \left (f x +e \right )}\) \(37\)
risch \(\frac {\sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) x}{{\mathrm e}^{2 i \left (f x +e \right )}-1}-\frac {2 \sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \left (f x +e \right )}{\left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) f}-\frac {i \sqrt {-\frac {b \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{2}}{\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}}\, \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{\left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right ) f}\) \(197\)

[In]

int((b*tan(f*x+e)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2/f*(b*tan(f*x+e)^2)^(1/2)/tan(f*x+e)*ln(1+tan(f*x+e)^2)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.19 \[ \int \sqrt {b \tan ^2(e+f x)} \, dx=-\frac {\sqrt {b \tan \left (f x + e\right )^{2}} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, f \tan \left (f x + e\right )} \]

[In]

integrate((b*tan(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/2*sqrt(b*tan(f*x + e)^2)*log(1/(tan(f*x + e)^2 + 1))/(f*tan(f*x + e))

Sympy [F]

\[ \int \sqrt {b \tan ^2(e+f x)} \, dx=\int \sqrt {b \tan ^{2}{\left (e + f x \right )}}\, dx \]

[In]

integrate((b*tan(f*x+e)**2)**(1/2),x)

[Out]

Integral(sqrt(b*tan(e + f*x)**2), x)

Maxima [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.59 \[ \int \sqrt {b \tan ^2(e+f x)} \, dx=\frac {\sqrt {b} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{2 \, f} \]

[In]

integrate((b*tan(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(b)*log(tan(f*x + e)^2 + 1)/f

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.72 \[ \int \sqrt {b \tan ^2(e+f x)} \, dx=-\frac {\sqrt {b} \log \left ({\left | \cos \left (f x + e\right ) \right |}\right ) \mathrm {sgn}\left (\tan \left (f x + e\right )\right )}{f} \]

[In]

integrate((b*tan(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

-sqrt(b)*log(abs(cos(f*x + e)))*sgn(tan(f*x + e))/f

Mupad [F(-1)]

Timed out. \[ \int \sqrt {b \tan ^2(e+f x)} \, dx=\int \sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2} \,d x \]

[In]

int((b*tan(e + f*x)^2)^(1/2),x)

[Out]

int((b*tan(e + f*x)^2)^(1/2), x)